<?php

/**
 * error action controller
 * default controller for handling all exception
 * usually this controller is used by front controller for handling global exceptions
 * @package yasns
 * @subpackage controller
 */
class ErrorActionController implements Command
{
	public $exception = null;
	
	public function execute()
	{
		$exception = $this->exception;
		$this->code = $exception->getCode();
		$this->message = $exception->getMessage();
		$this->trace = $exception->getTraceAsString();
		$vscript = APP_DIR . '/view/error/index.html';
		include $vscript;
		
		exit;
	}
}